Digital design and evaluation for additive manufacturing of personalized myopic glasses

Myopic glasses design has critical effects on the match between glasses and individual face. Improper myopic glasses design may affect the try-on comfort and health. It is difficult for the myopic glasses to be adjusted variedly and suitably from people to people with the limitations of traditional manufacturing processes and current design methods. In this paper, an evaluation descriptor named glasses fit score, which contains alignment scores and design scores, is proposed to guide and evaluate the myopic glasses design. Based on the descriptor, a novel approach is presented to complete the myopic glasses design and manufacturing individually. The approach can be divided into three steps: glasses alignment, glasses personalized design and glasses manufacturing. During the glasses alignment, the myopic glasses are aligned to the face to obtain the alignment score of the descriptor based on the face symmetry plane and feature points, including the silent point of the eye and the top point of the ear. After the glasses alignment, the myopic glasses can be deformed to match the face to achieve the design score of the descriptor. The deformations include glasses frame transformation, glasses leg option and glasses personalized mark. In the glasses manufacturing, the designed myopic glasses can be fabricated by a 3D printer. Then, a post processing process is conducted to polish the myopic glasses with oil painted. Finally, the proposed approach is applied to adjust the myopic glasses for several people. The results show that, compared to the previous methods, the approach can make the myopic glasses aligned and deformed to the individual face effectively to obtain an ideal score of the descriptor, thus improving the match between the glasses and the individual face.

www.nature.com/scientificreports/ relationship named glasses alignment method, and the local asymmetric features, e.g., the pupil distance, can be used to adjust the myopic glasses. The challenge of the myopic glasses personalized design is that there is no perfect standard to guide and evaluate it, especially the subjective indicators: try-on health and comfort. Thus, we present an evaluation descriptor named glasses fit score (GFS) to express the subjective indicators. But it is difficult for the subjective indicators to be embodied on the myopic glasses design. In order to build their relationships, the subjective indicators are decomposed into seven key objective indicators, e.g., the distance between glasses and eyes, the match of the geometric central distance of the glasses and the pupil distance of the face, the match of the glasses nose pad and the nose, and quantified which contain alignment and design scores.
The contributions of this paper are summarized as follows: (1) Quantification and evaluation indicators of the myopic glasses design are established, wherein, the subjective indicators describing try-on health and comfort of the myopic glasses are composed into seven key objective indicators by a descriptor glasses fit score (GFS). (2) A novel digital design and evaluation for additive manufacturing of personalized myopic glasses approach based on 3D individual face data is presented to adjust the myopic glasses to match the face. The global symmetric feature of the face is used to aligned the myopic glasses, and the local asymmetric features of the face are used to adjust the myopic glasses. (3) A novel glasses alignment method is proposed by using the face symmetry plane based on the local area of the nose. As it's no necessary to use a complete face data, the alignment efficiency can be greatly improved.

Related work
Current research on the glasses design contains forward design and reversal design.
In the first aspect of the glasses design, Niu et al. 3 carried out a three dimensional style design of multifunction glasses based on Pro/E software. Based on the design relevance between the general design and the myopic glasses, Ding and Wei 12 designed variable myopic glasses that were suitable for different shape parameters of faces to make the furthest need of users' individuality and variety. Ma et al. 4 used a top-to-down design technology to design the glasses by analysing the structure of the glasses and using UG software. Liu et al. 13 built a parametrization design mechanism of the glasses based on the measure size and model drive of 3D faces under the condition of measurement data of Chinese face data. Xu 14 developed a design system of glasses by utilizing the feature match of the glasses style cognize and the genetic algorithm of the glasses layer design way. Xu 5 built a design wizard system of the glasses based on the knowledge drive of UG software to decrease the dependence of the designer. Thus, the design efficiency was improved.
According to the forward design, different styles and specifications of the glasses can be designed based on experience. To the glasses without the need of vision correction, e.g., the sun glasses, the designed glasses can meet the need of people. However, it has limitations for the myopic glasses. Obviously, the designed glasses have symmetric features, e.g., the geometric central distance. There can be inconformity between the glasses and the individual faces, because the feature parameters of individual faces are significantly different, e.g., the differences of the pupil distance, which can make the distinction of the feature parameters between the individual faces and the glasses. Hence, MGIF can be imperfect and affect the comfort and health of try-ons for the myopic glasses.
The reversal design can be summarized with 2D based and 3D based. For the 2D based aspect, Jiang 15 designed an intelligent glasses equipment to realize the face detection function and show the result of the glasses try-on. Tan 6 gained 2D face data based on computer vision technology and designed a glasses virtual try-on system by combining face detection and 3D model processing technology. Young et al. 7 predicted the best style of glasses and showed virtual try-on results based on face images and depth convolutional neural networks. Milanova and Aldaeif 16 presented a virtual eye glasses try-on system that detected and tracked human faces and eyes for people to select 3D virtual glasses. But it is limited to the glasses virtual try-on with 2D images. The myopic glasses cannot be designed to achieve a good MGIF.
For the 3D based aspect, Zhou 17 adopted a 3D scanner to obtain a point cloud of the glasses. Then, reversal engineering software was applied to redesigning the glasses. Because it doesn't consider the individual face data, MGIF cannot be perfect for the myopic glasses. Patil et al. 8 designed a glasses virtual try-on system to conduct detection of individual faces and eyes for estimating a 3D face model. Martin and Batista 9 presented an automation detection frame of face attitude based on a single image to gain a 3D rigid model of the face. Yamamoto et al. 18 proposed a try-on system that can help users choose glasses frames and lenses by rendering users' 3D faces. However, the 3D face is not used to design the myopic glasses. Liu 10 used a 3D scanner to obtain the head information for building a digital head model. Parameterization can be provided for users to revise the selected glasses and analogue simulation between the glasses and head model. However, the glasses are designed based on some face features, and the feature data of the face cannot be excavated deeply to design the glasses. Thus, MGIF is imperfect for the myopic glasses. Wang 11 built a mathematical relation between face features and key design feature parameters of glasses to carry out parametrization design. Although some feature parameters of 3D face can be obtained to design the glasses, the parameters are insufficient, especially the pupil distance, which can lead to an imperfect MGIF for the myopic glasses.
It can be concluded that although current methods can meet the basic needs of the glasses design, they have limitations. For the forward design, as the glasses are designed based on experience and cannot consider the individual face data, MGIF may not be good, which may result in poor comfort of try-ons for the myopic glasses. For the reversal design, it is easy to obtain 3D face data with the development of 3D scanning technology and equipment. However, 3D face data are incomplete, and most current methods focus on virtual try-ons.
Although there are some methods based on the features of 3D face data, the research between match evaluation and individualized design is not sufficient and deep, and cannot achieve a perfect MGIF for the myopic glasses.
To obtain a perfect MGIF, a digital design and evaluation for additive manufacturing of personalized myopic glasses approach is proposed with glasses virtual assembly and personalized design based on symmetry plane and feature shape and size of the face, which can improve MGIF to enhance the health and comfort of the myopic glasses try-on.

Methods
The approach pipeline can be shown in Fig. 1. It can be mainly divided into three steps: glasses alignment, glasses personalized design and glasses manufacturing.
Glasses alignment (Fig. 1b). Glasses alignment can be summarized with three steps: symmetry alignment, coordinate system alignment and revised alignment. During the symmetry alignment, the reflective symmetry plane of the face is extracted to align to YOZ plane. In the coordinate system alignment, X axis alignment is conducted to align the silent point of the eye to the geometric central line at the position of the pupil height line of the glasses frame. Then, XOZ plane alignment is carried out to align the face according to a referring plane passing through the silent point of the eye and vertical to YOZ plane. Subsequently, the face is translated to keep a suitable distance between glasses and eyes to obtain the alignment score of GFS. During the revised alignment, height consistency between the inflection point of the plastic glasses leg and the top point of the ear is applied to revise the coordinate system alignment.
Glasses personalized design (Fig. 1c). Glasses personalized design containing glasses frame transformation, plastic glasses leg option and glasses personalized mark is carried out to obtain the design score of GFS. During the glasses frame transformation, glasses frame is translated based on the geometric central distance of the glasses and the pupil distance of the face, and rotated to match the dip angle of the face. Then, the nose pad is transformed to the nose with translation and rotation. Finally, pile head rotation is conducted to ensure the consistency between the widths of the glasses frame and the face. In the plastic glasses leg option, the glasses leg is selected to maintain the consistency between the length of the glasses and the face. In the glasses personalized mark, a series of features are respectively transferred on the frame and plastic glasses legs.
Glasses manufacturing (Fig. 1d). The designed glasses are fabricated by the 3D printer and polished by the grinder and painted.

Method declarations.
All methods were carried out in accordance with relevant guidelines and regulations. Ethics declarations. The Huaqiao University Ethics Committee reviewed and approved the study protocol.

Definition of the glasses fit score
It is necessary to define the components and coordinate system of the myopic glasses to successfully represent GFS and conveniently conduct the myopic glasses design.
Glasses component. The components of the myopic glasses contain glasses frame, metal glasses legs and plastic glasses legs, as shown in Fig. 2 with pink words. The glasses frame contains frame, nose bridge, nose pad and pile head, as shown in Fig. 2 with blue words. The geometric central distance at the position of the pupil height line of the glasses frame is the base of the glasses alignment, as shown in Fig. 2 with red words. When the glasses frame is deformed as a whole, it may go wrong with several connection relationship problems at the deformation position. On the one hand, when the dip angle of the glasses is adjusted, there may be a serious distortion at the connection relationship between the frame and the pile head, as shown in the left map of Fig. 3. On the other hand, when the nose pad is deformed with a great deformation, smoothing at the deformation area may also be imperfect, as shown in the right map of Fig. 3.
Therefore, a modularization method is applied in the process of the glasses personalized design to address these problems. The glasses frame is selectively divided into three parts, including the frame, the nose pad and the pile head, which are shown in Fig. 4. Each part of the glasses frame is deformed first. Then, the Boolean operation can be carried out to make them as a whole.
Glasses coordinate system. The coordinate system of the glasses is defined to be located in the middle of the geometric central line at the position of the pupil height line of the myopic glasses, which can make the glasses alignment carried out conveniently and rapidly, as shown in Fig. 2, wherein the cross lines are the geometric centers. X, Y and Z axes of the myopic glasses are along the direction of the geometric central line of the glasses frame, height and length of the glasses, respectively.
Glasses fit score. The ideal GFS should make the need for the conditions that are first try-on of health and then comfort 19,20 for the myopic glasses. For the first condition, on the one hand, the distance between the  www.nature.com/scientificreports/ glasses and the eye should be kept at a proper distance, that is, 12 mm, as shown in Fig. 5a. On the other hand, the geometric central line at the position of the pupil height line of the glasses should be aligned to the pupil distance line of the face, and the geometric central distance should be the same as the pupil distance, as shown in Fig. 5b. The comfort condition includes matching the width, the nose pad, the dip angle and the length with the face, which can be shown in Fig. 5b and Fig. 5c. Each item can be described with a certain score according to its importance for quantifying GFS containing alignment scores and design scores, whose full score is 100, as shown in Table 1.

Match of distance between glasses and eye (M-DGE).
It is a size match type, which can be presented the distance between the silent point of the eye and the geometric center of the glasses should be kept with a proper value, that is, 12 mm [20][21][22] . As the laser light of the scanner can stimulate the eye, the face is scanned with closed eyes, and the value is subtracted by the thickness of the eyelid approximately 1 mm. Hence, the ideal value is 11 mm. Long or short distances can affect the correction vision, leading to the eye health. Its score can be defined as 25, which can be subtracted from 1 by every deviation of 0.25 mm.    www.nature.com/scientificreports/

Match of geometric central distance and pupil distance of face(M-GP).
It is a size match type, which can be represented the geometric central distance should be the same as the pupil distance, and the geometric central line at the position of the pupil height line of the glasses should be aligned to pupil distance line of the face [23][24][25] . A great error can cause visual fatigue, deepening the myopic degree. Its score can be defined as 25, which can be subtracted from 1 by every deviation of 0.5 mm.

Match of nose pad and nose (M-NN).
It is a shape match type, which can be defined the nose pad should have a well match with the nose 12,26 . The match affects the support of the glasses. A bad match can cause the fall of the glasses, leading to an imperfect try-on comfort. Its score can be defined with 15. The score, subtracted from a bad match between the nose pad and the nose, can be defined from two aspects, including the try-on statement and the comfort, as shown in Table 2. Try-on statement is whether the nose pad slides from the nose or not.

Match of pile head and face (M-PF).
It is a size match type, which can be expressed the distance between the plastic glasses legs, which can be shown with the angle between the plastic glasses leg and the ear 12,27 . The ideal angle is 3-6°. It can affect the clamping force between the glasses and the face. A small angle may result in a low clamping force, which can cause the glasses to fall. A large angle may result in a high clamping force, leading to a bad try-on comfort. Its score can be defined as 10, which can be subtracted from 1 by every deviation of 1°.

Match of dip angle between glasses and face (M-DGF).
It is a size match type, which can be listed the dip angle of the glasses should match that of the face 12 . A large angle can affect try-on comfort, that is, the contact between glasses and individual faces with a great expression. Its score can be defined as 10, which can be subtracted from 1 by every deviation of 2°.

Match of length between glasses and face (M-LGF).
It is a size match type, which can be shown the length of glasses should have a well match with the face, that is, the match between the plastic glasses leg and the ear 21,28 . The ideal length of the plastic leg is 0-5 mm. A long leg may affect try-on comfort with slack statements. A short leg may affect try-on comfort with tight statements. Its score can be defined as 10, which can be subtracted from 1 by every deviation of 1 mm.
The appearance of glasses (AG). It can affect try-on effects 28,29 . Its score can be defined with 5.

Glasses alignment
The 3D face data is obtained by a 3D scanner, as shown in Fig. 6a. While scanning, the scanner software has a function to remove the noise points with outlier from the face. But it is difficult to scan the small features, e.g., the hair, so there are some missing parts in the area of these features. Then the useless data of the face can be trimmed manually, as shown in Fig. 6b. The trimmed standard is to maintain main features of the face, such as the nose, the eye, the ear, and so on. Before carrying out the myopic glasses design, it is important to select a proper myopic glasses based on the individual face data to first match the width and then the pupil distance of the face 12,30 . Too small or large a size Table 1. GFS quantification.

Item
Step www.nature.com/scientificreports/ can affect the try-on comfort and health 30 . The width and pupil distance of the face are approximately 135 mm and 66 mm, respectively, with the myopic degree 400 of the left and right eyes; thus, the glasses with a width of 137 mm and a geometric central distance of 67.1 mm are selected.
Symmetry alignment. The initial coordinate system of the face is obviously inconsistent with the myopic glasses, as shown in the left map of Fig. 7. A method proposed by Xu et al. 31 is applied to extract the face reflective symmetry plane (FRSP), as shown with a red plane in the middle map of Fig. 7 and pink selected mesh in the area of nose and blue FRSP normal. As it's no need to use the complete face data, the efficiency can be improved. Then its normal can be aligned to X axis, which is denoted as N x (1,0,0). The FRSP coefficient can be expressed as P s [p s0 p s1 p s2 p s3 ] with normal N s (p s0 , p s1 , p s2 ). Subsequently, FRSP can be translated to the coordinate system that is represented as O(0,0,0), and its normal is rotated to parallel to X axis.
Translation. During the translation, it is necessary to compute the translation transformation matrix f s0 based on the translation vector T s (t s0 , t s1 , t s2 ), which can be defined with O projected on FRSP. For a vertex and plane that are, respectively expressed as V 0 (x 0 , y 0 , z 0 ) and P 0 [A B C D], the vertex V p (x p , y p , z p ) that is V 0 projected on P 0 can be computed as follows: Therefore, the vertex V 1 (x 1 , y 1 , z 1 ) with O projected on FRSP can be computed according to Eqs. (1), (2) and (3) based on P s . Thus, T s can be obtained with T s (− x 1 , − y 1 , − z 1 ).
Subsequently, the face mesh can be translated according to f s0 . For a vertex V(x, y, z) transformed with a transformation matrix f, its coordinate value V′(x ′ , y ′ ,z′) can be computed as follows:  www.nature.com/scientificreports/ For a vertex translated with a vector T(t 0 , t 1 , t 2 ), its translation matrix f t can be shown as follows: Then, the vertices' Cartesian coordinate values of the face mesh can be computed according to Eqs. (4) and (5) based on T s .

Rotation.
After the translation, the face mesh is rotated with the rotation transformation matrix f s1 to make the consistency between N s and N x . The rotation axis and angle can be, respectively denoted with A 0 and α 0 that are, respectively calculated by A 0 = N s × N x and α 0 = arccos (N s • N x ).
A rotation transformation matrix f r can be computed as follows with the rotation axis and angle, which are, respectively denoted with V ax (x ax , y ax , z ax ) and α 32 : r · z ax r ; zz = (1 − cos α) · z ax r · z ax r ; xs = x ax r · sin α ; ys = y ax r · sin α ; zs = z ax r · sin α. Then, the vertices' Cartesian coordinate values of the face mesh can be computed according to Eq. (4) based on f s1 , which is calculated according to Eq. (6) based on A 0 and α 0 .
After the translation and the rotation, the alignment result is shown in the right map of Fig. 7. According to the alignment, N s is parallel to N x of the myopic glasses.
Coordinate system alignment. Coordinate system alignment contains X axis alignment, XOZ plane alignment and coordinate system translation. During X axis alignment, the face is translated to confirm its pupil distance point V 2 (x 2 , y 2 , z 2 ) which is the silent point of the eye located in the pupil height line of the glasses frame. V 2 can be extracted based on a descriptor named average weight curvature (AWC). The AWC of a vertex is calculated based on its curvature, coordinate value, and normal. Its computation can be shown as follows. First, the average coordinate value V (x, y, z) and the sum of the vertex normal N(n 0 , n 1 , n 2 ) can be calculated according to the selected mesh. Second, each vertex's coordinate deviation value V d (x d , y d , z d ) can be obtained with its coordinate value subtracted by V . Third, each vertex's AWC can be denoted as A w , which is represented by where k 1 and k 2 are the maximum and minimum curvatures, respectively. Finally, the maximum value of the vertex's A w can be found and selected as V 2 , as shown with a blue sphere in the selected mesh marked with a pink mesh in the left map of Fig. 8. Then, the translated vector T c0 can be obtained with T c0 (0, − y 2 , − z 2 ). Therefore, the vertices' Cartesian coordinate values of the face mesh can be computed according to Eqs. (4) and (5) based on T c0 .
After X axis alignment, a referring plane P R is created to rotate the face mesh to align to XOZ plane, whose normal can be represented with N y (0, 1, 0). P R can be created by three vertices, namely, V 2 , V 2a (x 2a , y 2a , z 2a ) and V 2b (x 2b , y 2b , z 2b ). V 2a can be defined with V 2 projected on YOZ plane by applying Eqs. (1), (2) and (3). V 2b can be presented with V 2a projected on the face mesh. Thus, P R can be created with its plane coefficient denoted as In the end, P R can be shown with its normal marked with a red line in www.nature.com/scientificreports/ the second-to-left map of Fig. 8. Then, the face mesh is rotated with transformation matrix f c0 . The rotation axis and angle can be, respectively denoted with A 1 and α 1 that are, respectively calculated by Eq. (7) and α 1 = arccos (N u • N y ). Then, the vertices' Cartesian coordinate values of the face mesh can be computed according to Eq. (4) based on f c0 , which is calculated according to Eq. (6) based on A 1 and α 1 .
During the coordinate system translation, the distance between the face pupil distance point and the coordinate system of the glasses along Z axis is adjusted to keep a suitable distance between the glasses and the eye. It is usually that the distance set at 11 mm can make the try-on health and comfort come true. Thus, the translation vector T c1 can be denoted with T c1 (0, 0, − 11) to obtain an ideal score of M-DGE of GFS. Therefore, the vertices' Cartesian coordinate values of the face mesh can be computed according to Eqs. (4) and (5) based on T c1 . After the coordinate system alignment, the result is shown in the third-to-left and right maps of Fig. 8.
Revised alignment. After the coordinate system alignment, the face has not been aligned to the myopic glasses at an accurate position, e.g., the inconsistency between the inflection point of the plastic glasses leg (labelled with the red words in Fig. 2) and the top point of the ear that are marked with V L (x L , y L , z L ) and V E (x E , y E , z E ), respectively, as shown in Fig. 9 with the red and blue points. The ideal consistency is that V E has the same coordinate value as V L along Y axis.
Subsequently, the face mesh is rotated along a certain axis A 2 to make V E keep the same coordinate value as V L along Y axis, as shown in Fig. 10.
In Fig. 10, points R(0, y E , z E ) and M(0, y L , z L ) are V E and V L , respectively, which are projected on YOZ plane. After rotation with angle α 2 , R is rotated to M′(0, y E , z M ′) to keep the same coordinate value of Y axis with M. As the length of OR is the same as that of OM′, that is, ‖OR‖ 2 = ‖O M′‖ 2 , M′ can be computed on the same side of M. Thus, A 2 can be obtained by A 2 = (OR × OM′)/‖OR × OM′‖ 2 , and α 2 is calculated by α 2 = arccos (OR • OM′). Therefore, the face mesh can be computed according to Eq. (4) based on transformation matrix f R , which is calculated according to Eq. (6) based on A 2 and α 2 . The result is shown in the third-to-left and right maps of Fig. 9.

Glasses personalized design
Glasses frame transformation. Frame transformation. The frame transformation can be summarized with two steps: translation and rotation.
Translation. The frame is translated to make the geometric central distance of the glasses satisfy the pupil distances of the left and right eyes. The translation is achieved by scaling the nose bridge within the selected planes that pass through vertices V CR (x CR , 0, 0) and V CL (x CL , 0, 0) and parallel to YOZ plane, as shown in the left map of Fig. 11, wherein x CR and x CL are less and more than zero, respectively. Furthermore, the scale of the nose bridge is only along X axis to maintain the frame feature. Suppose the geometric central points of the glasses and the pupil distance points of the face are, respectively marked with V GR (x GR , 0, 0), V GL (x GL , 0, 0), V ER (x ER , 0, 0) and V EL (x EL , 0, 0), the frame is translated with the translation matrix f 1 and f 2 out of the selected planes, and deformed with the scale matrix f 3 and f 4 within the selected planes. V GR and V GL are the right and left geometric central points of the glasses, respectively. V ER and V EL are the right and left pupil distance points of the face, respectively. According to the size of the glasses and the face mentioned before, x GR , x GL , x ER and x EL are − 33.55, 33.55, − 33 and 33,  As the deformation within the selected planes is only along X axis, f 3 and f 4 can be obtained by the scale vector S 0 ((x ER − x GR +|x CR |)/|x CR |, 1, 1) and S 1 ((x EL − x GL + x CL )/x CL , 1, 1) according to Eq. (8). Therefore, the transformation matrix f 0 can be defined as follows: Then, the frame mesh can be deformed according to Eq. (4) based on f 0 to obtain an ideal score of M-GP of GFS, as shown in the middle and right maps of Fig. 11.
Rotation. The frame is rotated to maintain the consistency between the dip angles of the frame and the face, as shown in Fig. 12.
On the one hand, the dip line of the frame L 0 is defined in two steps. First, it is defined by the plane passing through the geometric central point and paralleling to YOZ plane, as shown in the left map of Fig. 12. Second, it is made up of two points that are the inner vertex of the up and down frames in the section (Fig. 2), as shown in the left map of Fig. 12. On the other hand, the dip line of the face L 1 can be shown in the right map of Fig. 12, wherein it is in the section with also passing through the geometric central point and paralleling to YOZ plane and made up of two points that are, respectively the vertex in the positon of the eyebrow and the cheek. If L 1 and L 0 are inconsistent, that is, L 1 and L 0 projected on YOZ plane are not parallel to each other, it may lead to the try-on discomfort, for instance, the contact between the glasses and the face with a great expression. Therefore, the frame is rotated along X axis with paralleling L 0 to L 1 .
For the frame, L 0 can be obtained by the section defined by the frame and the plane P GD with coefficient P 1 [1 0 0 − x EL ] that passes through V EL and parallels YOZ plane. It can be divided into two steps: the intersection mesh selection and the intersection point computation. During the first step, the marked mesh M m is selected when its X coordinate value of the vertex is more than x EL . Then, the intersection mesh M IG is selected with 1-ring neighborhood adjacent triangles of the boundary vertices of M m . Thus, the intersection edges can be computed with their different vertices' sign distances on P GD .
Suppose a line and a plane have coefficient P[a b c d]. The intersection point can be computed as shown in Fig. 13, wherein the intersection line consists of two vertices V 3 (x 3 , y 3 , z 3 ) and V 4 (x 4 , y 4 , z 4 ), and their projection   www.nature.com/scientificreports/ points are marked with D 1 (x d1 , y d1 , z d1 ) and D 2 (x d2 , y d2 , z d2 ), respectively. Obviously, the scale at the projection line divided by D 1 is the same as the intersection line divided by the intersection point V 5 (x 5 , y 5 , z 5 ), as shown in Eq. (10).
where λ is the scale factor. Then, V 5 can be compute as follows: Therefore, the intersection points can be computed based on the intersection edges and P 1 , as shown with the black vertices in Fig. 14, wherein the pink mesh in the glasses is M IG . Subsequently, L 0 is created with its vertices selected manually in the intersection points, as shown with the red vertices and green line in Fig. 14, wherein the vertices in the up and down frames are respectively marked with V 10 (x 10 , y 10 , z 10 ) and V 11 (x 11 , y 11 , z 11 ).
Similar to L 0 , the intersection mesh M IF and points P IF can be obtained, as shown in Fig. 14 It is initial, as the vertices selected manually are inaccurate and should be adjusted in the next step. The adjustment is conducted to find the ideal vertices by rotating the plane through L 1 along N x , as shown with the blue plane in Fig. 14, wherein the plane passes through V 20 , V 21 and V 22 (0, y 21 , z 21 ).
After obtaining L 0 and L 1 , L 0 can be rotated to parallel to L 1 with obtaining an ideal M-DGF score of GFS. Then, the vertices can be revised with V 10 (0, y 10 , z 10 ), V 11 (0, y 11 , z 11 ), V 20 (0, y 20 , z 20 ) and V 21 (0, y 21 , z 21 ). The rotation angle α 3 can be computed by α 3 = arccos (V 10 V 11 • V 20 V 21 ). Subsequently, the vertices' Cartesian coordinate values of the frame mesh can be computed according to Eq. (4) based on the rotation transformation matrix f 5 , which is calculated according to Eq. (6) based on N x and α 3 , as shown in Fig. 15.
Nose pad transformation. Nose pad transformation can be summarized with two procedures: translation and rotation.
Translation. The nose pad can be translated along X, Y and Z axis with the transformation matrix f n0 based on the translation vector T n0 (x n0 , y n0 , z n0 ). However, if the nose pad is translated along Y axis, there may be a connection relationship problem between the nose pad and the frame, as shown in Fig. 16, wherein the different distances at the intersection may affect the appearance of the glasses.
Two assistant lines are set in the nose pad to solve the problem, as shown in Fig. 17, wherein the lines are made up of two protruding points marked with V 30 (x 30 , y 30 , z 30 ) and V 31 (x 31 , y 31 , z 31 ), V 40 (x 40 , y 40 , z 40 ) and V 41 (x 41 , www.nature.com/scientificreports/ y 41 , z 41 ) that are in the left and right nose pads, respectively. Then, T n0 can be defined along X axis, the assistant lines and Z axis by Eq. (12).
where T a (x a , y a , z a ) and T b (x b , y b , z b ), the translation vectors of the left and right nose pads along the left and right assistant lines, respectively, can be calculated as follows:  www.nature.com/scientificreports/ where δ is the translation distance and N z is Z axis vector denoted as N z (0, 0, 1). Then, the vertices' Cartesian coordinate values of the nose pad mesh can be computed according to Eqs. (4) and (5) based on T n0 , as shown in Fig. 18.
Rotation. The nose pad is rotated to match the nose along the assistant lines. The transformation matrices f n1 and f n2 are for the left and right nose pads, respectively. Their rotation axes can be defined with A 3 and A 4 , which can be denoted as A 3 = V 30 V 31 and A 4 = V 40 V 41 , respectively. Then, the vertices' Cartesian coordinate values of the nose pad mesh can be computed according to Eq. (4) based on f n1 and f n2 , which is calculated according to Eq. (6) based on A 3 and A 4 with an assigned angle value, as shown in Fig. 19.
Furthermore, it is necessary to stop the rotation when there is much more intersection mesh between the nose pad and the nose to obtain an ideal M-NN score of GFS. The intersection mesh can be extracted as shown in Fig. 20, wherein there are two triangles T1 and T2. The vertex Q f is the vertex P f of T2 projected on T1 with normal n f . Obviously, if Q f P f • n f < 0, the triangles may intersect each other. Therefore, after every rotation, the approach proposed above is applied to computing the intersection mesh between the nose pad and the nose, as shown in Fig. 19, wherein the pink mesh is the intersection mesh.
Pile head transformation. Because the distance between the left and right legs affects the myopic glasses try-on comfort, it is important to have a suitable distance. The shorter distance may affect try-on comfort with tightness. The longer distance may lead to the fall of the glasses. In this paper, the distance is adjusted to match the (18) z b = δ · cos(arccos(V 40 V 41 · N z ))  www.nature.com/scientificreports/ face by rotating the pile head with a definition angle β. β is the angle between the leg and face, as shown in the left map of Fig. 21, which is defined to evaluate the try-on comfort between the glasses and the face. According to the definition, β is made up of three points, which are To ensure that the consistency between V E and V L along Y direction cannot be changed, the pile head is only limited to rotate along the vertical direction. The rotation axis is approximately the axis of the round corner at the pile head, as shown with green lines in the middle map of Fig. 21, wherein the axes are made up of the vertices marked with V 50 (x 50 , y 50 , z 50 ) and V 51 (x 51 , y 51 , z 51 ), V 60 (x 60 , y 60 , z 60 ) and V 61 (x 61 , y 61 , z 61 ) that are in the right and left assistant modes of the pile head, respectively. For instance, the assistant mode is a cone located in the right pile head, as shown in the right map of Fig. 21, wherein the red point is V 50 . The transformation matrices f p0 and f p1 are for the right and left pile heads, respectively. Their rotation axes can be defined with A 5 and A 6 , which can be denoted as A 5 = V 50 V 51 and A 6 = V 60 V 61 , respectively. Then, the vertices' Cartesian coordinate values of the pile head mesh and metal and plastic glass leg mesh can be computed according to Eq. (4) based on f p0 and f p1 , which is calculated according to Eq. (6) based on A 5 and A 6 with an assigned angle value.
To obtain an ideal β, a series of pile head transformation experiments are conducted with β values of 3°, 6°, 9°, 12° and 15°, as shown in Fig. 22. Try-on results show that when β is more than 9°, as the distance between the left and right leg is so short that the try-on comfort is bad with serious tightness. When β is between 3° and 6°, the try-on result is good with the good try-on comfort of suitable tightness for obtaining an ideal M-PF score of GFS. In this paper, β with 6° is selected for conducting the application and comparison.
Plastic glasses leg option. The plastic glass legs' match with the ear may affect try-on comfort and tightness. The glasses leg is designed with three series of difference matches with the metal glasses leg to adjust the match with the face, as shown with variable match depth L in Fig. 23, wherein the match depths between the plastic and the metal glasses leg are different, which are L0, L1 and L2, respectively. A certain series of plastic glasses legs can be selected to keep the match of length between the myopic glasses and the face, that is, the consistency of V E and V L along Z axis. In this paper, L is selected to be 13.5 mm, and the distance between V E and V L along Z axis is 3.06 mm, which can obtain an ideal score of the M-LGF of GFS.
Glasses personalized mark. In the course of post processing, it is difficult to identify the parts belonging to the same pair of the myopic glasses, especially for the same style of the glasses. Therefore, a list of number features are marked on the frame and the plastic glasses legs by applying the feature reuse approach 33 , as shown in Fig. 24 and Fig. 25.

Glasses manufacturing
After glasses alignment and personalized design, the designed myopic glasses were fabricated with DM500 material by a 3D printer in XFAB 3500SD mode from Italy, as shown in Fig. 26. Then, the glasses were cleaned by an ultrasonic cleaner, and supports were cleared manually. Subsequently, the glasses were polished by a grinding mill and painted with a selected colour. Finally, the lens is processed by edge grinding machine according to the size of glasses frame, and assembled to the glasses frame manually.
The try-on results of the myopic glasses and GFS are shown in Fig. 27 and Table 3, respectively. The GFS is computed by the method mentioned above based on the scanned face with the glasses, which is scanned first. Then, the whole glasses are aligned to the glasses worn on the face. As the glasses are adjusted based on the individual faces, M-DGE, M-GP, M-NN, M-PF, M-DGF and M-LGF can be approximately satisfied, although there might be errors compared to the ideal values because of manufacturing and assembly errors. A perfect GFS can be achieved to ensure the health and comfort of try-ons. Specifically, the down frame of the glasses cannot contact the face with a great expression shown in the right map of Fig. 27, compared to the commercial glasses shown in the right map of Fig. 28, where the down frame of the glasses can contact the face with a great expression. The reason is that the commercial glasses are based on experience without concerning the individual face, which can cause the imperfect GFS, as shown in Table 3. Therefore, the commercial glasses can usually fall from

Results and discussion
To test the effect and robustness of our algorithm, we carry out our method to design the myopic glasses for comparison with the commercial glasses with forward design and the Liu 10 method. The feature sizes of the example face and the selected myopic glasses are shown in Table 4 Example 1  250  175  34  33  139  70  141   Example 2  200  150  29  29  130  63  128   Example 3  500  550  33  33  150  73  For the Liu 10 method, the pupil distance of the face, width and height of the nose, and width and length of the face were measured to adjust the myopic glasses. M-GP, M-PF and M-LGF can be satisfied. However, there are some match problems in MGIF. M-DGE cannot be well designed. Although the nose pad cannot slide from the nose, M-NN cannot be adjusted well, because it is only based on size without considering the shape of the face and the try-on comfort. Moreover, the dip angle of glasses cannot be adjusted to match the face. As the frame and the pile head are adjusted to match the face, there may be a small relationship problem in the pile heads. With slightly low M-DGE and M-NN scores, the match between the nose pad of the glasses and the nose of the face cannot be good, which can lead to an imperfect try-on comfort. The overall score of GFS is 81.
With regard to our method, because the myopic glasses are first aligned to the individual face considering the distance between the glasses and the eye, M-DGE can be approximately satisfied. Then, the nose bridge is translated to confirm M-GP, and the frame is rotated according to the dip angle of the face. Subsequently, the nose pad is translated and rotated to the nose based on the shape of the nose, and the pile head is rotated to keep a proper angle between the plastic glasses leg and the ear. Finally, a suitable plastic glasses leg is selected to ensure that the length between the glasses and face matches. However, the frame and the pile head are translated and rotated to match the face, and the connection relationship at the frame and the plie head cannot be perfect. In a word, the whole score of GFS is up to 92. Compared to the commercial glasses and the Liu 13 method, our method can fully consider the try-on health and comfort. Therefore, the highest GFS score can be obtained with the best MGIF, and a perfect try-on glasses result can be achieved.
Example 2 has a slightly smaller pupil distance compared to the adult size of 62-68 mm 23 and a slightly smaller face width compared to the adult size of 137-149 mm 34 . The commercial glasses cannot perfectly make the need for this feature and match the individual face well with GFS 64, leading to a bad MGIF. For the Liu 10 method, GFS is 74. For our method, although the glasses frame is translated by 3 mm with an error of M-GP 2 mm, it can satisfy the standard under the condition of the myopic degree 35 . The glasses can be adjusted to a small pupil distance and match the face features with GFS 84, which can obtain the best MGIF compared to the commercial glasses and the Liu 10 method.
The face width of example 3 is slightly larger compared to the adult size of 137-149 mm 34 . For the commercial glasses, it is difficult to design the glasses to match the features with GFS 67, which can cause the try-on  www.nature.com/scientificreports/ health and comfort problems. To the method of Liu 10 , GFS is 71. For our method, although the glasses frame is translated by 3 mm with an error of M-GP 4 mm, it can satisfy the standard under the condition of the myopic degree 35 . As our algorithm can design the glasses based on the size of the face, the width and other features of the glasses can match well to the face. The GFS is 85, and MGIF can be improved greatly to obtain the best and most comfortable try-on compared to the commercial glasses and the Liu 10 method.

Conclusion
In this paper, a novel digital design and evaluation for additive manufacturing of personalized myopic glasses approach is presented to design the myopic glasses based on the individual face according to a novel evaluation descriptor GFS. As the myopic glasses are adjusted to the individual face based on the face features, an ideal GFS